package com.example.vertification.repository;

import com.example.vertification.entity.ChatMessage;
import com.example.vertification.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
public interface ChatRepository extends JpaRepository<ChatMessage, Long> {


        List<ChatMessage> findBySenderUidAndReceiverUid(Long senderUid, Long receiverUid);
        List<ChatMessage> findBySenderUid(Long senderUid);
        List<ChatMessage> findByReceiverUid(Long senderUid);


}